package com.fastfood.util;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;

import org.apache.commons.io.FileUtils;

public class FileUploadUtil {

	public static boolean uploadFile(File file, Path path) {
		if (file != null) {
			try {
				FileUtils.copyFile(file, path.toFile());
				return true;
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return false;
	}
}
